export default [
  {
    path: "/",
    // 假如路径是/，重定向到films
    redirect: "films",
    name: "home",
    component: () => import("@/views/index.vue"),
    children: [
      {
        path: "/films",
        name: "films",
        component: () => import("@/views/home/film.vue"),
        meta: {
          title: "电影"
        }
      },
      {
        path: "/cinemas",
        name: "cinemas",
        component: () => import("@/views/home/cinema.vue"),
        meta: {
          title: "影院"
        }
      },
      {
        path: "/ad",
        name: "ad",
        component: () => import("@/views/home/ad.vue"),
        meta: {
          title: "资讯中心"
        }
      },
      {
        path: "/center",
        name: "center",
        component: () => import("@/views/home/center.vue"),
        meta: {
          title: "个人中心"
        }
      },
    ],
  },
  {
    path: "/film/:id",
    name: "film",
    component: () => import("@/views/cinema/filmdetail.vue"),
    meta: {
      title: "电影详情"
    }
  },
  {
    path: "/cinema/:id/film",
    name: "cinemafilm",
    component: () => import("@/views/cinema/cinemadetail.vue"),
    meta: {
      title: "影院详情"
    }
  },
  {
    path: "/film/:id/cinemas",
    name: "filmscinemas",
    component: () => import("@/views/cinema/buyticket.vue"),
    meta: {
      title: "选座购票"
    }
  },
  {
    path: "/cinemas/search",
    name: "search",
    component: () => import("@/views/search/index.vue"),
    meta: {
      title: "影院搜素"
    }
  },
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index.vue"),
    meta: {
      title: "登录"
    }
  },
  {
    path: "/city",
    name: "city",
    component: () => import("@/views/city/index.vue"),
    meta: {
      title: "切换城市"
    }
  },
];
